\subsubsection{Class: Controller}
This class controlls all parts of the application. It interacts with the GUI, handle profiles and segments. In addition it visualizes the playback of the audio file with a timeline and marks the current playing position and the selected segment on it.

\begin{ocl}{none}{Controller}
\inv{none}
\end{ocl}


\subsubsection{Class: AudioPlayer}
This is the class for the playback of audio files, which delivers methods for play, pause and stop a song. It stores the current position of the playback. Furthermore the class allows to change the volume and the speed of the playback.

\begin{ocl}{If no segment is selected, the current position is between the start and the end of the whole song}{AudioPlayer}
\inv{selected segment == null \to self.current\_position \ge 0 \&\& self.current\_position \le duration}
\end{ocl}

\begin{ocl}{If a segment is selected, the current position is between the
start and the end of the segment}{AudioPlayer}
\inv{selected segment \ne null \to
self.current\_position \ge selected segment.start \&\& self.current\_position \le selected segment.end}
\end{ocl}

\begin{ocl}{The volume is between 0\% \&\& 100\%}{AudioPlayer}
\inv{self.volume \ge 0 \&\& self.volume \le 100}
\end{ocl}


\subsubsection{Class: AudioEffect}
This class represents audio effects and their possible parameters, which can be adjusted individually. Of capital importance is the method to apply the audio effect to an audio block.

\begin{ocl}{Parameters are set}{AudioEffect}
\inv{self.paremeters \ne null}
\end{ocl}


\subsubsection{Class: Segment}
This class represents segments. It offers several methods to handle and manipulate the audio file like select, copy, paste and delete segments.

\begin{ocl}{Segment is a part of the audio file}{Segment}
\inv{0 \le self.start \&\& self.end \le duration}
\end{ocl}

\begin{ocl}{Start of the segment is before the end}{Segment}
\inv{self.start \le self.end}
\end{ocl}


\subsubsection{Class: Profile}
This class allows to manage the different profiles a user can have. It has methods to store and to load a profile. The class contains the information about all settings the user has adjusted like applied effects, volume and speed of the playback.

\begin{ocl}{desc}{Profile}
\inv{self.applied_effects \ne null \&\& self.applied_effects.Size() \ge 1}
\end{ocl}
